#include <iostream>
#include <algorithm>
#include <ctime>
using namespace std;
/* 计算间隔时间，以秒为单位。 */
double calc_elapsed_seconds(const struct timespec *ts_from,
        const struct timespec *ts_to)
{
    struct timespec ts_curr;
    time_t ds;
    long dns;

    if (ts_to == NULL) {
        clock_gettime(CLOCK_THREAD_CPUTIME_ID, &ts_curr);
        ts_to = &ts_curr;
    }

    ds = ts_to->tv_sec - ts_from->tv_sec;
    dns = ts_to->tv_nsec - ts_from->tv_nsec;
    return ds + dns * 1.0E-9;
}
double s[1030],a,b,c;
string f4(){
    if(((c-a)/b)==(int)((c-a)/b)) return "True";
    else return "False";
}
string f1(){
    for(int i=0;i<1024;++i){
        if(s[i]==c){
            return "True";
        }
    }
    return "False";
}
string f3(){
    if(binary_search(s,s+1024,c,[](double x,double y){return y-x;})) return "True";
    else return "False";
}
string f21(){
    size_t mid;
    int start=0;
    int end=1023;
    while (start <= end) {
        mid = start + ((end - start) >> 1);
        if (s[mid] < c)
            start = mid + 1;
        else if (s[mid] > c)
            end = mid - 1;
        else {
            return "True";
        }
    }
    return "False";
}
string f22(){
    size_t mid;
    int start=0;
    int end=1023;
    while (start <= end) {
        mid = start + ((end - start) >> 1);
        if (s[mid] > c)
            start = mid + 1;
        else if (s[mid] < c)
            end = mid - 1;
        else {
            return "True";
        }
    }
    return "False";
}
string f2(){
    if(b>=0)
        return f21();
    else
        return f22();
}
int main(){
    cin>>a>>b>>c;
    s[0]=a;
    for(int i=1;i<1024;++i){
        s[i]=s[i-1]+b;
    }
    cout<<f2()<<endl;
    struct timespec t1;
    clock_gettime(CLOCK_THREAD_CPUTIME_ID, &t1);
    for(int i=0;i<=100000;++i)
        f1();
    double duration1 = calc_elapsed_seconds(&t1, NULL);
    std::cout << "It took me " << duration1 << " seconds." << std::endl;
    struct timespec t2;
    clock_gettime(CLOCK_THREAD_CPUTIME_ID, &t2);
    for(int i=0;i<=100000;++i)
        f2();
    double duration2 = calc_elapsed_seconds(&t2, NULL);
    std::cout << "It took me " << duration2 << " seconds." << std::endl;
    struct timespec t3;
    clock_gettime(CLOCK_THREAD_CPUTIME_ID, &t3);
    for(int i=0;i<=100000;++i)
        f3();
    double duration3 = calc_elapsed_seconds(&t3, NULL);
    std::cout << "It took me " << duration3 << " seconds." << std::endl;
    struct timespec t4;
    clock_gettime(CLOCK_THREAD_CPUTIME_ID, &t4);
    for(int i=0;i<=100000;++i)
        f4();
    double duration4 = calc_elapsed_seconds(&t4, NULL);
    std::cout << "It took me " << duration4 << " seconds." << std::endl;
}
